import { http } from "@/utils/http/index.ts";
import type {
  PageVoCompanyUserWorkLoadVo,
  PageVoProjectDemandReportListVo,
  PageVoProjectReportVo
} from "@/api/models/index.ts";

export function listProject(query: {
  current?: number;
  size?: number;
  /**
   * 项目名称
   */
  keyword?: string;
}) {
  return http.get<PageVoProjectReportVo>("/project/report/project", {
    params: query
  });
}

export function listTask(query: {
  current?: number;
  size?: number;
  /**
   * 需求名称
   */
  keyword?: string;
  projectId?: string;
}) {
  return http.get<PageVoProjectDemandReportListVo>("/project/report/task", {
    params: query
  });
}

export function listWorkLoad(query: {
  current?: number;
  size?: number;
  /**
   * 工号
   */
  keyword?: string;
  /**
   * 开始时间
   */
  startTime?: string;
  /**
   * 结束时间
   */
  endTime?: string;
}) {
  return http.get<PageVoCompanyUserWorkLoadVo>("/project/report/workload", {
    params: query
  });
}
